<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
    <head>
        <th:block th:include="include :: header('课程考试题列表')"/>
    </head>
    <body class="gray-bg">
        <div class="container-div">
            <div class="row">
                <!--            <div class="col-sm-12 search-collapse">-->
                <!--                <form id="formId">-->
                <!--                    <div class="select-list">-->
                <!--                        <ul>-->
                <!--                            <li>-->
                <!--                                <label>所属课程内容：</label>-->
                <!--                                <select name="courseDetailId" th:with="type=${@dict.getType('')}">-->
                <!--                                    <option value="">所有</option>-->
                <!--                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
                <!--                                </select>-->
                <!--                            </li>-->
                <!--                            <li>-->
                <!--                                <label>考试标题：</label>-->
                <!--                                <input type="text" name="examTitle"/>-->
                <!--                            </li>-->
                <!--                           -->
                <!--                            <li>-->
                <!--                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>-->
                <!--                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>-->
                <!--                            </li>-->
                <!--                        </ul>-->
                <!--                    </div>-->
                <!--                </form>-->
                <!--            </div>-->

                <div class="col-sm-12 select-table table-striped">
                    <table id="bootstrap-table"></table>
                </div>
            </div>
        </div>
        <th:block th:include="include :: footer"/>
        <script th:inline="javascript">
            var editFlag   = [[${@permission.hasPermi('biz:examscore:edit')}]];
            var removeFlag = [[${@permission.hasPermi('biz:examscore:remove')}]];
            var prefix     = ctx + "biz/examscore";

            $(function () {
                var options = {
                    url: prefix + "/list",
                    createUrl: prefix + "/add",
                    updateUrl: prefix + "/edit/{id}",
                    removeUrl: prefix + "/remove",
                    exportUrl: prefix + "/export",
                    modalName: "课程考试题",
                    columns: [
                        {
                            field: 'id',
                            title: 'id',
                            visible: false
                        },
                        {
                            field: 'courseName',
                            title: '课程'
                        },
                        {
                            field: 'courseDetailTitle',
                            title: '内容'
                        },
                        {
                            field: 'examTitle',
                            title: '试题'
                        },
                        {
                            field: 'passed',
                            title: '考试结果',
                            formatter: function (value, row, index) {
                                if (0 === +value) {
                                    return '<span class="badge badge-danger">未通过</span>'
                                }
                                return '<span class="badge badge-primary">通过</span>'
                            }
                        },
                        {
                            field: 'createTime',
                            title: '通过时间'
                        },

                    ]
                };
                $.table.init(options);
            });
        </script>
    </body>
</html>